package com.wangrui.service;

import com.wangrui.utils.Page;
import com.wangrui.dto.UserSchool;
import com.wangrui.pojo.User;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author 王锐
 * @since 2020-07-05
 */
public interface UserService extends IService<User> {
    User login(User user);

    List<User> queryAllUser();

    int saveUser(User user);


    int getTotal();

    List<UserSchool> getUserSchool(Page<UserSchool> page1);

    int updateUser(User user);

    /**
    * @Description:  通过id删除用户
    * @Param: [ids]
    * @return: int
    * @Author: 王锐
    * @Date: 2020/7/5
    */
    int deleteUserByIds(int ids);

    /**
    * @Description:  异步查询 username
    * @Param: [username]
    * @return: com.wangrui.pojo.User
    * @Author: 王锐
    * @Date: 2020/7/5
    */
    Boolean queryUserByUserName(String username);
    /**
    * @Description:  security登录通过username查找用户
    * @Param: [username]
    * @return: com.wangrui.pojo.User
    * @Author: 王锐
    * @Date: 2020/7/6
    */
    User selectUser(String username);

    List<User> userQueryJson();

}
